package com.gao.dao;

import com.gao.domain.Goods;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

/**
 * @author gao
 * @time 2020/04/2020/4/24 21:57:39
 */
@Repository
@Mapper
public interface GoodsMapper {
    Goods findByGid(Integer gid);
    void deductStock(Integer gid, Integer amount);
    void delete(Integer gid);
    void save(Goods goods);
    int deductStockByVersion(Integer gid, Integer amount, Integer version);
}
